package com.fenghongzhang.day004;

import io.reactivex.Observable;
import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;

public interface Api {

    //ios/cf/dish_list.php?stage_id=1&limit=20&page=1
    @GET("/ios/cf/dish_list.php?stage_id=1&limit=20&page=1")
    Call<Food> getCall();


    //和Rxjava集合
    @GET("/ios/cf/dish_list.php?stage_id=1&limit=20&page=1")
    Observable<Food> getFoodCall();

    //和Rxjava集合------
    @GET("/ios/cf/dish_list.php?stage_id=1&limit=20")
    Observable<Food> getFoodCall1(@Query("page") String page);

    //和Rxjava集合
    @POST("/ios/cf/dish_list.php?stage_id=1&limit=20&page=1")
    Observable<Food> getFoodCall2();

    //和Rxjava集合
    @FormUrlEncoded
    @POST("/ios/cf/dish_list.php?stage_id=1&limit=20")
    Observable<Food> getFoodCall3(@Field("page") String page);


    //和Rxjava集合
    @GET("/{ios}/cf/dish_list.php?stage_id=1&limit=20&page=1")
    Observable<Food> getFoodCall4(@Path("ios") String ios);
}
